﻿using Basefr.Attributes;
using Basefr.Core.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace Paas.Core.Sys.Entities
{
    /// <summary>
    /// 用户登录
    /// </summary>
    [MainTable(nameof(UserLogin))]
    public class UserLogin : EntityBase<long>
    {
        /// <summary>
        /// 用户
        /// </summary>
        public long UserId { get; set; }
        [ForeignKey(nameof(UserId))]
        public virtual User User { get; set; }

        /// <summary>
        /// 用户登录IP
        /// </summary>
        [MaxLength(100)]
        public string Ip { get; set; }
    }
}

